package com.navinfo.opentsp.platform.computing.analysis.entity;

import java.io.Serializable;

public class VehiclePassTimesDetail implements Serializable, Comparable<VehiclePassTimesDetail> {
    private static final long serialVersionUID = 1L;

    private long tid;
    private long mileage;        //整车里程
    private long runTime;        //发动机运行时长
    private boolean faultCode;    //是否有故障码
    private long gpsDate;

    public long getTid() {
        return tid;
    }

    public void setTid(long tid) {
        this.tid = tid;
    }

    public long getMileage() {
        return mileage;
    }

    public void setMileage(long mileage) {
        this.mileage = mileage;
    }

    public long getRunTime() {
        return runTime;
    }

    public void setRunTime(long runTime) {
        this.runTime = runTime;
    }

    public boolean getFaultCode() {
        return faultCode;
    }

    public void setFaultCode(boolean faultCode) {
        this.faultCode = faultCode;
    }

    public long getGpsDate() {
        return gpsDate;
    }

    public void setGpsDate(long gpsDate) {
        this.gpsDate = gpsDate;
    }

    @Override
    public int compareTo(VehiclePassTimesDetail o) {
        long i = this.getGpsDate() - o.getGpsDate();
        if (i > 0) {
            return 1;
        } else if (i < 0) {
            return -1;
        } else {
            return 0;
        }
    }
}
